/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package icantalk;

import java.util.Vector;
 
/**
 * A Message class.<p>
 * This class holds information about messages.
 *
 * @author orfrenkel
 */
public class Message implements java.io.Serializable
{
	
	public int _header;
	/**_username String holds the user name.*/
	public String _username;
	/**_destination holds the message's destination.*/
	public String _destination;
	/**_message holds the message's content.*/
	public String _message;
	/**_host holds the message's host.*/
	public String _host;
	/**_user User type holds the user.*/
	public User _user;
	public java.util.Vector userlist;
	/**_data holds the message's data.*/
	public String _data;

	
	/**
	 *  A constructor.
	 * Gets a empty message.
	 */
	
	public Message()
	{
		//EMPTY MESSAGE
	}
	
	 
	/**
	 * A constructor.
	 * Gets a header.
	 * @param header (int) insert header to the Massege "_header".
	 * 
	 */
	
	public Message(int header)
	{
		_header = header;
	}

	
	/**
	 *  A constructor.
	 * Gets a message (string) and a header.
	 * @param header insert header to the Message "_header"
	 * @param message insert message to the Message "_message"
	 */
	
	public Message(int header,String message)
	{
		_header = header;
		_message=message;
	}
	
	/**
	 *	 A constructor.
	 *   Gets a message and copies its parameters to this Message parameters.
	 *   @param message (Message type) insert all Message parameters to there plase
	 */
	
	public Message(Message message )
	{
		this._header = message._header;
		this._username = message._username;
		this._destination = message._destination;
		this._message = message._message;
		this._host = message._host;
		this._user = message._user;
		this.userlist= message.userlist;
		this._data = message._data;
	}

	/** Returns the message.
	 * @return _message */
	public String getMessage()
	{
		return _message;
	}
}
